package classesMiolo;

import java.util.HashMap;
import java.util.Map.Entry;

public class ReverseMapper {
    
    public static String getKeyFromValue(HashMap<String, Character> map, char value){
        for(Entry<String,Character> entry : map.entrySet()){
            if(value == entry.getValue()) return entry.getKey();
        }
        return null;
    }
    
    public static String getKeyFromValue(HashMap<String, Integer> map, int value){
        for(Entry<String,Integer> entry : map.entrySet()){
            if(value == entry.getValue()) return entry.getKey();
        }
        return null;
    }
}
